#ifndef COMMON_H
#define COMMON_H

#include <QObject>
#include <QDebug>

class MainWindow;
class Common : public QObject
{
    Q_OBJECT
public:
    static Common* getInstance();
    // 设置窗口样式
    static void setStyle(const QString &style);
    static void printLog(QVariant value);

    void setMainWindow(MainWindow* pmain);
    MainWindow* getMainWindow();
    void setBackgroundImage(QString img);
    QString getBackgroundImage();
    void setMainWinOpacity(int opacity);
    int getMainWinOpacity();

private:
    explicit Common(QObject *parent = 0);
    Common(const Common& cm);
    Common& operator =(const Common& cm);


private:
    static Common* m_pInstance;

    MainWindow* m_pMain;
    QString m_bkImg;
    int m_mainWinOpacity;

};

#endif // COMMON_H
